package com.decent.ejfadmin.ebitg.mybatisplus;

import java.util.Date;

import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;

@Component
public class TimeHandler implements MetaObjectHandler {

	@Override
	public void insertFill(MetaObject metaObject) {
		metaObject.setValue("createTime", new Date());
	}

	@Override
	public void updateFill(MetaObject metaObject) {
		metaObject.setValue("updateTime", new Date());
	}

}
